package com.cyh.mylib.eventbus;

import androidx.annotation.Nullable;

/**
 * @author 程延宏
 * @description: EventBus的消息
 * @date :6/23 11:15
 */
public class MessageEvent {
    private int status;
    /**
     * Target class for string.
     */
    private String target;

    private String msg;

    public MessageEvent(int status, Class target) {
        this.status = status;
        this.target = target.getName();
    }

    public  MessageEvent(int status, String target) {
        this.status = status;
        this.target = target;
    }

    public MessageEvent(int status, Class target, @Nullable String msg) {
        this.status = status;
        this.target = target.getName();
        this.msg = msg;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getTarget() {
        return target;
    }

    public void setTarget(Class target) {
        this.target = target.getName();
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
